<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="org.apache.struts.taglib.html.Constants" %> 
<%@ page import="org.apache.struts.Globals" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="x-ua-compatible" content="ie=7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加用户</title>
<link href="/webvote/pages/style/main.css" rel="stylesheet" type="text/css" />
<link  rel ="stylesheet"  type ="text/css"  href ="/webvote/pages/ext/resources/css/ext-all.css" /> 
<script  type ="text/javascript"  src ="/webvote/pages/ext/adapter/ext/ext-base.js" ></script> 
<script  type ="text/javascript"  src ="/webvote/pages/ext/ext-all.js" ></script> 
<script type="text/javascript" src="/webvote/pages/js/user.js"></script>
<script type="text/javascript" src="/webvote/pages/js/jquery-1.3.1.js"></script>
<script type="text/javascript">    
function reloadImg(){   
  document.getElementById("rc").src = "/webvote/logout.do?action=validate&abc="+Math.random();
 }
 </script>	
<%org.apache.struts.util.TokenProcessor.getInstance().saveToken(request);
	%>
</head>

<body style=" width:100%; background:url(/webvote/pages/images/index-1_15.gif) repeat-x #f3f3f3;">
<div class="c-top f14"><img src="/webvote/pages/images/download2 r.gif" /><p>您当前所在的位置：<span>用户信息</span>>><span>添加用户</span></p></div>
<div class="biaodan" style="height:100%;width:100%;overflow:auto;">
          <form action="/webvote/user.do?action=adduser" method="post">

		  <input type="hidden" name="<%=Constants.TOKEN_KEY%>"    value="<%=session.getAttribute(Globals.TRANSACTION_TOKEN_KEY)%>"/> 
          <ul>
          <li><div>用户账号：</div><input id="usersAccount" name="usersAccount" type="text" /><span>*注册帐号名长度限制在１－２０字</span></li>
          <li><div>用户密码：</div><input id="usersPass" name="usersPass" type="password" /><span>*密码至少６位,不超出20位</span></li>
          <li><div>再次输入密码：</div><input id="rePass" name="rePass" type="password" /><span>*请仔细确认您的密码</span></li>
          <li><div>真实姓名：</div><input id="usersName" name="usersName" type="text" /><span>*请输入您的真实姓名（1-20字）</span></li>
          <li><div>用户角色：</div>
          		<select name="role">
                                <option selected="selected" value="select">——请选择用户角色——</option>
                    			<c:forEach var="role" items="${allroles}">
                    			   <option value="${role.rid}">${role.rname}</option>
                    			</c:forEach>
                </select>
          </li>     
          <li><div>输入验证码：</div><input name="randNumber" id="randNumber" type="text" /><img src="/webvote/logout.do?action=validate&abc=<%=java.lang.Math.random() %>" id="rc" title="点击更换图片" onclick="reloadImg()" width="67" height="24"/></li>                                                                              
          </ul>
          <div class="anniu"><input name="" type="button" value="添&nbsp;&nbsp;&nbsp;加" onclick="addUser()"/><input name="" type="button" value="取&nbsp;&nbsp;&nbsp;消" onclick="javascript:history.go(-1)"/></div>
          </form>
  </div>
</body>
</html>
